import { request } from './request'

const POST = 'POST';
const GET = 'GET';

export const user = {
    //登录；
    login(params) {
        return request(GET, 'index.php/Loginc/loginapi', params);
    },
    //用户信息；
    info(params) {
        return request(GET, 'index.php/Db/grxx', params);
    },
    //修改登录密码
    setloginPwd(params) {
        return request(POST, 'index.php/Db/updatecode', params);
    },
    //修改交易密码
    setdealPwd(params) {
        return request(POST, 'index.php/Db/updatepass', params);
    },
    // 忘记密码
    findpass(params) {
        return request(POST, 'index.php/Loginc/findpass', params);
    },
    // 注册
    register(params) {
        return request(POST, 'index.php/Loginc/adduser', params);
    },
    // 我的资产
    zhichan(params) {
        return request(GET, 'index.php/Db/wdzc', params);
    },
    // // 资产转账
    // zczz(params) {
    //     return request(POST, 'index.php/Db/zczz', params);
    // },
    // 资产转账
    zczz(params) {
        return request(POST, 'index.php/Db/zczzz', params);
    },
    // 资产转账链接
    qbdz(params) {
        return request(GET, 'index.php/Db/qbdz', params);
    },

    //修改用户资料 
    setinfo(params) {
        return request(POST, 'index.php/Db/updateuser', params);
    },
    // 绑定微信
    bindwx(params) {
        return request(POST, 'index.php/Db/wx', params);
    },
    // 绑定支付宝
    bindali(params) {
        return request(POST, 'index.php/Db/zfb', params, { "Content-Type": "multipart/form-data" });
    },
    // 绑定银行卡
    bindbank(params) {
        return request(POST, 'index.php/Db/yhk', params);
    },
    // 退出登录
    outlogin(params) {
        return request(POST, 'index.php/Loginc/logindie', params);
    },
    // 查看绑定支付
    bindpay(params) {
        return request(GET, 'index.php/Db/skm', params);
    },
    yzm(params) {
        return request(GET, 'index.php/Loginc/send', params);
    },
    loginyzm(params) {
        return request(GET, 'index.php/Loginc/send1', params);
    },
    ding(params) {
        return request(GET, 'index.php/Db/ding', params);
    },
    monding(params) {
        return request(GET, 'index.php/Db/ding_lib', params);
    },
    dingcount(params) {
        return request(GET, 'index.php/Db/ding_count', params);
    }
    
    

};
// 资讯
export const news = {
    //资讯
    newslist(params) {
        return request(GET, 'index.php/Db/news', params);
    },
    // 资讯详情
    newsdetail(params) {
        return request(GET, 'index.php/Db/newsview', params);
    },
    // 资产明细
    assets(params) {
        return request(GET, 'index.php/Db/zcmx', params);
    },
    // 交易统计
    statas(params, that) {
        return request(GET, 'index.php/Db/jytj', params, header, that);
    },
    banner(params) {
        return request(GET, 'index.php/Db/banner', params);
    }

}

export const sms = {
    code(params) {
        return request(GET, 'index.php/Db/send', params);
    }
};


export const service = {
    get(params) {
        return request(GET, 'index.php/Db/callkf', params);
    }
};

// 挂卖挂买
export const trads = {
    // 列表
    rate(params) {
        return request(GET, 'index.php/Db/sxf', params);
    },
    // 列表
    tradlist(params) {
        return request(GET, 'index.php/Db/jydt', params);
    },

    // 挂卖操作
    tradhang(params) {
        return request(POST, 'index.php/Db/guamai', params);
    },
    // 挂买操作
    tradsell(params) {
        return request(POST, 'index.php/Db/guamai2', params);
    },
    // 卖出
    hang(params) {
        return request(POST, 'index.php/Db/mc', params);
    },
    // 买入
    sell(params) {
        return request(POST, 'index.php/Db/mr', params);
    },
    // 挂买卖详情
    tradDetail(params) {
        return request(GET, 'index.php/Db/jydtvie', params);
    },
    // 确认收款
    receipt(params) {
        return request(POST, 'index.php/Db/qrsk', params);
    },
    // 我的订单
    order(params) {
        return request(GET, 'index.php/Db/wddd', params);
    },
    // 订单详情
    orderDetail(params) {
        return request(GET, 'index.php/Db/jydtvie', params);
    },
    orderDetailTwo(params) {
        return request(GET, 'index.php/Db/lookv', params);
    },

    // 取消订单
    orderCancel(params) {
        return request(GET, 'index.php/Db/qxdd', params);
    },
    // 上诉接口
    appeal(params) {
        return request(POST, 'index.php/Db/wyss', params);
    },
    // 上传打款截图
    makePic(params) {
        return request(POST, 'index.php/Db/dkjt', params);
    },
    // 
    ssview(params) {
        return request(GET, 'index.php/Db/ssview', params);
    },
    lookdkjt(params) {
        return request(GET, 'index.php/Db/lookdkjt', params);
    },
    // 今日成交量
    setbj(params) {
        return request(GET, 'index.php/Db/setbj', params);
    },
    maxcjl(params) {
        return request(GET, 'index.php/Db/maxcjl', params);
    },

}


export const guide = {
    list(params) {
        return request(POST, 'sms/valid_code', params);
    },
    jytj(params, that) {
        return request(GET, 'index.php/Db/jytj', params, {}, that);
    },
    //分享
    share(params) {
        return request(GET, 'index.php/Db/fxzc', params);
    },
    // 用户注册规则
    rule(params) {
        return request(GET, 'index.php/Loginc/zcxy', params);
    },
    // 交易规则
    jyrule(params) {
        return request(GET, 'index.php/Db/jygz', params);
    },
    // 游戏规则
    gamerule(params) {
        return request(GET, 'index.php/Db/yxgz', params);
    },


}

export const games = {
    // 我的团队
    teams(params) {
        return request(GET, 'index.php/Db/myteam', params);
    },
    //购买点位
    goumai(params) {
        return request(POST, 'index.php/Db/game_mdw', params);
    },
    // 点位模型
    dwmx(params) {
        return request(GET, 'index.php/Db/dwmx', params);
    },
    // 游戏首页内容
    home(params) {
        return request(GET, 'index.php/Db/game_home', params);
    },
    // 奖励记录
    fdjl(params) {
        return request(GET, 'index.php/Db/fdjl', params);
    },
    // 我的点位
    wddw(params) {
        return request(GET, 'index.php/Db/wddw', params);
    },
    zfmm(params) {
        return request(POST, 'index.php/Db/zfmm', params);
    },
    // 游戏排单

    pd(params) {
        return request(POST, 'index.php/Db/game_pd', params);
    },
    tjcjjl(params) {
        return request(POST, 'index.php/Db/tjcjjl', params);
    },
}